package com.huazhen.itrip.biz.controller;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;

import com.huazhen.itrip.beans.User;

import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;

@Controller
@Api(value="API",basePath="/http://api.itrip.com/api")
@RequestMapping(value="/api/user")
public class SwaggerTestController {
	@RequestMapping(value="/findUser/{uid}", method = RequestMethod.GET, produces = "application/json")
	@ApiOperation(value="根据用户查询对象")
	public @ResponseBody User findUser(@ApiParam(name="uid")@PathVariable int uid) {
		User user=new User();
		user.setUid(uid);
		user.setUsername("name="+uid);
		return user;
	}
}
